package com.warmheart.builder.access;

import com.warmheart.core.rs.base.BaseRsBuilder;
import com.warmheart.core.rs.oper.Rs;
import com.warmheart.entity.access.AccessLog;

/**
 * 
 * @ClassName: AccessLog
 * @Description: 访问记录实体RsBuilder类，对应表名称为tb_access_log
 *               温馨提示：不要修改该实体RsBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午13:05:35
 *
 */
public class AccessLogRsBuilder extends BaseRsBuilder<AccessLog, AccessLogRsBuilder> {

    private final AccessLog t;

    @Override
    protected AccessLogRsBuilder self() {
        return this;
    }

    @Override
    public AccessLog core() {
        return this.t;
    }

    public AccessLogRsBuilder(AccessLog accessLog) {
        t = accessLog;
    }

    /**
     * 用户ID
     */
    private Rs<AccessLog, AccessLogRsBuilder> userId;

    /**
     * 资源类型
     */
    private Rs<AccessLog, AccessLogRsBuilder> resourceType;

    /**
     * 资源ID
     */
    private Rs<AccessLog, AccessLogRsBuilder> resourceId;

    /**
     * 操作类型
     */
    private Rs<AccessLog, AccessLogRsBuilder> action;

    /**
     * IP地址
     */
    private Rs<AccessLog, AccessLogRsBuilder> ipAddress;

    /**
     * 用户代理
     */
    private Rs<AccessLog, AccessLogRsBuilder> userAgent;

    /**
     * 操作详情
     */
    private Rs<AccessLog, AccessLogRsBuilder> details;

    public Rs<AccessLog, AccessLogRsBuilder> userId() {
        if (this.userId == null) {
            this.userId = new Rs<AccessLog, AccessLogRsBuilder>(self(), "user_id", "userId");
        }
        return this.userId;
    }

    public Rs<AccessLog, AccessLogRsBuilder> resourceType() {
        if (this.resourceType == null) {
            this.resourceType = new Rs<AccessLog, AccessLogRsBuilder>(self(), "resource_type", "resourceType");
        }
        return this.resourceType;
    }

    public Rs<AccessLog, AccessLogRsBuilder> resourceId() {
        if (this.resourceId == null) {
            this.resourceId = new Rs<AccessLog, AccessLogRsBuilder>(self(), "resource_id", "resourceId");
        }
        return this.resourceId;
    }

    public Rs<AccessLog, AccessLogRsBuilder> action() {
        if (this.action == null) {
            this.action = new Rs<AccessLog, AccessLogRsBuilder>(self(), "action", "action");
        }
        return this.action;
    }

    public Rs<AccessLog, AccessLogRsBuilder> ipAddress() {
        if (this.ipAddress == null) {
            this.ipAddress = new Rs<AccessLog, AccessLogRsBuilder>(self(), "ip_address", "ipAddress");
        }
        return this.ipAddress;
    }

    public Rs<AccessLog, AccessLogRsBuilder> userAgent() {
        if (this.userAgent == null) {
            this.userAgent = new Rs<AccessLog, AccessLogRsBuilder>(self(), "user_agent", "userAgent");
        }
        return this.userAgent;
    }

    public Rs<AccessLog, AccessLogRsBuilder> details() {
        if (this.details == null) {
            this.details = new Rs<AccessLog, AccessLogRsBuilder>(self(), "details", "details");
        }
        return this.details;
    }
}